package com.marvels.dubbo.umservice.controller;

import com.fintech.user.entity.RealNameAuthentication;
import com.marvels.dubbo.umservice.service.RealNameAuthentyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("dubbo/um/realNameAuthenticat/api")
public class RealNameAuthenticationController {
	
	@Autowired
	private RealNameAuthentyService realNameAuthenticationService;
	
	@RequestMapping("realNameAuthentication")
	@ResponseBody
	public RealNameAuthentication realNameAuthentication(@RequestParam("custIdCard") String custIdCard){
		return realNameAuthenticationService.querByIdentiyCardNo(custIdCard);
	}
	@RequestMapping("queryByUserId")
	@ResponseBody
	public RealNameAuthentication queryByUserId(@RequestParam("userId") Integer userId){
		return realNameAuthenticationService.queryByUserId(userId);
	}
}
